package fun.tan90.trace.model;

import lombok.Getter;

import java.util.Date;
import java.util.Objects;

@Getter
public class PitchData extends BaseData {

    /**
     * 横滚角X轴
     */
    private final Double pitch;

    public PitchData(Date ts, Double pitch) {
        super(ts);
        this.pitch = pitch;
    }

    @Override
    public Double calValue() {
        return Objects.nonNull(pitch) ? -pitch : null;
    }
}